package com.warm.androidstudy.constant;


import com.warm.androidstudy.MyApplication;

import java.util.Dictionary;
import java.util.List;

/**
 * 通用常量
 * Created by shenyq on 2017/6/6 0006.
 */

public class SConstant {

    public final static String SP_KEY_TOKEN_VALID = "token_valid"; // 平台的token是否有效
    public final static String SP_KEY_USER_DB_NAME = "user_db_name"; // 用户数据库名
    public final static String appCode = "5g_box"; //河北省胸科医院医生端安卓
    public final static String myCustomProductCode = "IH-HBSXK-D"; //本地自定义的产品code
    public final static String contentType = "application/json;charset=UTF-8";

    private static List<Dictionary> mDictList;//系统字典数据
    public final static String CASignClientId = "2020092111000011";//测试环境
    public final static String CASignClientId_Release = "2018022616133213";//正式环境

    public final static String Url_Release = "https://gateway.hbzjjk.com/";//正式环境接口地址
    public final static String Web_Release = "https://hbsxk-web.hbzjjk.com";//正式环境H5


    public static final String H5_BASE_URL = "https://haoyi-api.metamedical.com.cn/h5/";
    public static final String RESOURCE_URL = "https://resources.metamedical.com.cn/haoyi";

    /**
     * 通用Intent的key
     */
    public final static String DEFAULT_INTENT_KEY = "defaultIntentKey";
    public final static String Key_EnterFlag = "EnterFlag";
    public final static String Value_DoctorToDoctor = "DoctorToDoctor";//医生跟医生聊天
    public final static String Value_JustLookRecord = "JustLookRecord";//只是查看聊天记录
    public final static String Key_InpatientId = "Key_InpatientId";

    //版本号
    public static String VersionName;
    public static int VersionCode;
    public static String DEVICE_ID;//设备id

    public static String TencentUploadDir_Public = "ih/real/";//cos 公开权限文件目录
    public static String TencentUploadDir_Private = "ih/resource/";//cos 私有加密权限文件目录 + orgCode + 文件名（yyyyMMddHHmmss + _ + uid）

    //IP地址
    public static String File_Connect_Url = "Hbsxkconnecturl";//文件名1 注销不清理
    public static String File_Connect_WebUrl = "Hbsxkconnecwebturl";// web 注销不清理
    public static String Key_Connect_Url = "HbsxkKeyOfConnectUrl";
//    public static String Internet_HOST = "http://218.244.151.169:9980/";
//    public static String Internet_HOST = "https://haoyi-api.metamedical.com.cn/";

//    public static String Internet_HOST = H5_BASE_URL;
    public static String Internet_HOST = "";
//    public static String Web_HOST = RESOURCE_URL;//H5服务器地址
    public static String Web_HOST = H5_BASE_URL;//H5服务器地址

    public static String Key_Connect_Lib = "Key_Connect_Lib";//库标       识
    public static String LibStatus = "";//库状态
    //登录 (全局变量名字)
    public static String Login_FILE = "HbsxkuserInfo";//文件名2  -- 用户名相关
    public static String Key_Login_UserName = "HbsxkuserName";//文件名3 (登录成功的用户账号列表数据) 注销不清理 -- 用户名相关
    //session -- token (全局)
    public static String LoginFile_UUID = "HbsxkFileUUID";//文件名4
    public static String Key_LoginFile_UUID = "Hbsxkkey_uuid";

    //LoginStatusModel 用户信息
    public static String File_UseInfoModel = "File_HbsxkUseInfo";//文件名 注销不清理 -- 用户信息model相关
    public static String Key_UseInfoModel = "Key_HbsxkUseInfo";//key 注销不清理   -- 用户信息model相关

    //StaffModel 医生账户Staff信息
    public static String File_StaffInfoModel = "File_HbsxkStaffInfo";//文件名 注销不清理 -- 医生账户Staff信息相关
    public static String Key_StaffInfoModel = "Key_HbsxkStaffInfo";//key 注销不清理   -- 医生账户Staff信息相关

    //orgCode信息
    public static String File_OrgInfo = "File_OrgInfo";//文件名 注销不清理 -- orgCode相关
    public static String Key_OrgInfo = "Key_OrgInfo";//key 注销不清理   -- orgCode相关

    //缓存IM聊天页的一些缓存数据
    public static String File_IMCache = "File_IMCache";//文件名 注销不清理

    public static String File_IMEditText = "File_IMEditText";

    public static String File_NoticeForm = "File_NoticeForm";

    //消息--获取分类消息key缓存数据
    public static String File_ClassifyMsgKey = "File_ClassifyMsgKey";//文件名 注销不清理
    public static String Key_ClassifyMsgKey = "Key_ClassifyMsgKey";//key 注销不清理

    public static String Key_MsgDefaultTimeStamp = "Key_ClassifyMsgKey";//key和文件名同名 注销不清理

    //消息--获取分类消息key缓存数据（侧滑删除已读 -- 不再显示）
    public static String File_HideDelClassifyMsg = "File_HideDelClassifyMsg";//文件名 注销不清理
    public static String Key_HideDelClassifyMsg = "Key_HideDelClassifyMsg";//key 注销不清理

    //消息--获取分类消息key缓存数据（侧滑删除已读 -- 不再显示）
    public static String File_HideDelIMMsg = "File_HideDelIMMsg";//文件名 注销不清理
    public static String Key_HideDelIMMsg = "Key_HideDelIMMsg";//key 注销不清理

    //腾讯云上传相关
    public static String TencentBucket = "zjjk-1255331212";//Bucket
    public static String TencentAppId = "1255331212";//appid  对象存储的服务APPID
    public static String TencentRegion = "ap-beijing";//region 存储桶所在的地域
    public static String StorageEmulated = "/storage/emulated/0";//外存目录

    //忽略版本更新
    public static String File_Version_Update = "File_Version_Update";
    public static String Key_Version_Update = "Update_Ignore";

    public static String deptId = "deptId";
    public static String inquiryId = "inquiryId";

    //通知栏显示的NotifyId
    public static String File_NotifyId = "File_NotifyId";
    public static String Key_NotifyId = "Key_NotifyId";

    //webview 缓存地址
    public static String App_WebCache_path = "HbsxkWebCahe";//文件名5 注销不清理
    //信鸽推送返回token
    public static String xgToken;

    public static int LongToastTime = 5000;//长时间的弹5秒

    //H5地址
    public static String PRIVATE_AGREEMENT = "pagesA/healthy/health_information_detail?hid=1318752169251332098";
    public static String USER_AGREEMENT = "pagesA/healthy/health_information_detail?hid=1318752444817104897";
    public static String ABOUT_US = "pagesA/healthy/health_information_detail?hid=1318806483323871233";

    //得到系统版本号
    public static String getVersionName() {
        try {
            SConstant.VersionName = MyApplication.getContext().getPackageManager().getPackageInfo(MyApplication.getContext().getPackageName(), 0).versionName;
        } catch (Exception e) {
            SConstant.VersionName = "1.0.0";
        }
        return SConstant.VersionName;
    }

    //得到系统版本号code
    public static int getVersionCode() {
        try {
            SConstant.VersionCode = MyApplication.getContext().getPackageManager().getPackageInfo(MyApplication.getContext().getPackageName(), 0).versionCode;
        } catch (Exception e) {
            SConstant.VersionCode = 10103;
        }
        return SConstant.VersionCode;
    }


//    //1、初始化配置类（服务配置） -- 腾讯云对象存储
//    public static CosXmlServiceConfig getCosXmlServiceConfig() {
//        String appid = SConstant.TencentAppId;//对象存储的服务APPID
//        String region = SConstant.TencentRegion;//存储桶所在的地域
//        //创建 CosXmlServiceConfig 对象，根据需要修改默认的配置参数
//        CosXmlServiceConfig serviceConfig = new CosXmlServiceConfig.Builder()
//                .setAppidAndRegion(appid, region)
//                .setDebuggable(true)
//                .builder();
//        return serviceConfig;
//    }
}
